The present invention is related to training algorithms for machine vision systems and more specifically to an iterative process that generates an optimal machine vision process for recognizing a pattern in images.
One task performed by many machine vision systems is to attempt to identify the location and orientation of a pattern of interest within images. Several different classes of algorithms have been developed to perform this pattern locating task.
One advantageous class of such algorithms uses a model to represent the pattern of interest which includes a plurality of probes. Each probe is a measure of similarity of a run-time image feature or region to a pattern feature or region at a specific location. The plurality of probes is applied at a plurality of poses to the run-time image and the information from the probes at each pose is used to determine the most likely poses of the pattern in the run-time image. The individual probes may be as described in U.S. Pat. No. 7,016,539 which is titled “Method For Fast, Robust, Multi-dimensional Pattern Recognition” which issued on Mar. 21, 2006 and which is incorporated herein by reference in its entirety, or could be something different, for example normalized correlation. Hereafter this class of pattern matching algorithms will be referred to as probe model algorithms.
To speed up the pattern recognition process, at least some probe model algorithms use a set of models corresponding to different image resolutions to iteratively determine the pose of a pattern in an image. For instance, an algorithm may include five different models where each model is for a different resolution of image. Here, during the pattern recognition process, a coarse resolution and associated model may be used initially to identify a coarse approximated pose of an instance of a pattern in an image. Thereafter, a relatively finer resolution may be used to more precisely identify the pose of the pattern instance in the image. This iterative process continues until a finest resolution model is used and the precise pose of the pattern instance is identified.
For probe model algorithms to work properly, robust models need to be developed during a model training process for each pattern to be recognized within an image. Known model training algorithms have several shortcomings. For instance, in some cases a training algorithm will select an initial image resolution for subsequent recognition processes that may not work properly. In another instance the user may manually enter an initial image resolution that may also not work properly. To this end, in lower resolution images, pattern features that are detectable when a pattern is aligned in one juxtaposition with respect to a camera may disappear when the pattern is aligned slightly differently with the camera due to sub-pixel phase shift. Where an image resolution is selected during a training process with a camera aligned in one juxtaposition with respect to the camera, if the pattern is misaligned slightly during a subsequent recognition process, the pattern pose may not be precisely determinable.
As another instance, while models developed using known model training processes work well for recognizing instances of some patterns of interest, experience has shown that known training processes can generate non-robust or less than optimal models for some types of patterns. One pattern type that known model training processes are often unable to generate robust models for includes patterns that have repeating elements such as the pattern that results when a ball grid array is imaged. To this end, at least some existing model training processes use a training image to generate a series of images of a training pattern at different image resolutions. The processes then collect statistics pertaining to the spatial distribution of edges in each image in the series known as weights. The processes then pick a maximum coarse image resolution for the model based on the circular moment of inertia of these weights with a compensating factor for scale. Here, the compensating factor ensures that the process does not always select a finer image resolution because the edges are more disparate. These processes tend to select maximum image resolutions such that the trained models contain relatively straight or slowly curving long chains of strong edges that are at a distance from the model center.
When one of the training processes described above is used to develop models and a model sequence to be used during a subsequent pattern recognition process where the pattern to be recognized includes repeating elements, the resulting recognition process often results in identification of an incorrect pose (i.e., a pose where the detected pattern instance is misaligned with the actual pattern instance in the image).
Thus, it would be advantageous to have a better recognition system training process for selecting an optimal initial model including an optimal initial resolution for use during subsequent recognition processes.